/**
 * 个人中心二级菜单
 */
var pc_submenu = document.getElementById("pc_submenu");
var pc_submenu_top = document.getElementById("pc_submenu_top");

function showPcSubmenu(){
	pc_submenu.style.display = "block";
	pc_submenu_top.style.display = "inline-block";
}

function hidePcSubmenu(){
	pc_submenu.style.display = "none";
	pc_submenu_top.style.display = "none";
}
/**
 * 搜索框
 */
var nav = document.getElementById("nav");
var icon_box = document.getElementById("icon_box");
var close_icon = document.getElementById("close_icon");
var search_box = document.getElementById("search_box");
var search_box_left = document.getElementById("search_box_left");
var search_bar = document.getElementById("search_bar");
function showSearchBox(){
	nav.style.display = "none";
	nav.style.opacity = 0;
	icon_box.style.display = "none";
	nav.style.opacity = 0;
	search_box.style.display = "block";
	//搜索框获取焦点
	search_bar.focus();
}

function clickCloseIcon(){
	close_icon.className = "rotate_close_icon absolute";
	search_box_left.className = "hide_search_box_left";
	window.setTimeout(showNavAndIconBox, 800);
	
	var nav_class = nav.className;
	var icon_box_class = icon_box.className;
	nav.className = nav_class + " increase_opacity";
	icon_box.className = icon_box_class + " increase_opacity";
	window.setTimeout(function() {
		nav.className = nav_class;
		icon_box.className = icon_box_class;
	}, 800);
}

function showNavAndIconBox(){
	search_box.style.display = "none";
	nav.style.display = "block";
	nav.style.opacity = 1;
	icon_box.style.display = "block";
	icon_box.style.opacity = 1;
	close_icon.className = "close_icon anti_rotate_close_icon absolute";
	search_box_left.className = "search_box_left show_search_box_left";
}